package com.start.boot.service.impl;

import com.start.boot.dao.ajpc.DataDictionaryMapper;
import com.start.boot.domain.DataDictionary;
import com.start.boot.domain.DataDictionaryExample;
import com.start.boot.service.DataDictionaryService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @caomin
 * @create 2017-12-05 22:04
 **/
@Service
public class DataDictionaryServiceImpl implements DataDictionaryService {

    @Autowired
    DataDictionaryMapper dataDictionaryMapper;

    @Override
    public List<DataDictionary> getDataDictionaryByLBBM(String lbbm) {
        if (StringUtils.isNotEmpty(lbbm)){
            DataDictionaryExample dataDictionaryExample = new DataDictionaryExample();
            dataDictionaryExample.createCriteria().andLbbmEqualTo(lbbm).andSfscEqualTo("N");
            return dataDictionaryMapper.selectByExample(dataDictionaryExample);
        }
        return null;
    }
}
